/**
 * 账号相关
 */
import http from './http'
import { useUserStore } from '@/stores/user'

const useStore = useUserStore()

export const login=(data, callback) => http.post('/v1/login', data, callback, true)

export const logout = () =>useStore.logout()


export const updatePwd=(data, callback) =>http.post('/v1/modify_pwd' , data, callback, false)

export const getUserMemberShip = (data, callback) =>http.get('/v1/get_membership' , data, callback, false)

export const updateAvatar=(data, callback) =>http.post('/v1/modify_avatar' , data, callback, false)

export const updateUsernamme=(data, callback) =>http.post('/v1/edit_username' , data, callback, false)

export const updatePassword=(data, callback) =>http.post('/v1/modify_password' , data, callback, false)

export const registerSendCode=(data, callback) =>http.post('/v1/send_code' , data, callback, false)

export const register=(data, callback) =>http.post('/v1/register' , data, callback, false)
